#ifndef __HTTPSERVER_H
#define __HTTPSERVER_H

#include <iostream>
#include <string>
#include <map>

using std::string;
using std::map;

// HTTP响应
class HttpResponse
{
public:
    HttpResponse();
    void set_html_body(const string &htmlpath);
    void set_str_body(const string & str);

    string get_html_response();

private:
    string _version = "HTTP/1.1";
    int _statusCode = 200;
    string _statusText = "OK";
    map<string, string> _headers;
    string _body;
};

#endif